package org.linlinjava.litemall.db.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * litemall商店商品工作
 *
 * @author yliyun
 * @date 2022/11/25
 */
@Data
@TableName("litemall_shop_merchandise_job")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LitemallShopMerchandiseJob implements Serializable {

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)//转化成string传到前端
    private Long id;

    /**
     * 定时执行
     */
    @NotEmpty
    private String cron;

    /**
     * 任务名称
     */
    @NotNull
    private String jobName;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 任务说明
     */
    private String instructions;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;


}
